package com.itany.vo;

import lombok.Data;
import java.io.Serializable;

@Data
public class ActionResult implements Serializable{
	
	private String msg;
	
	private Integer status;
	
	private Object data;

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}


	public static ActionResult success(String msg,Integer status,Object data) {
		ActionResult result = new ActionResult();
		result.setMsg(msg);
		result.setStatus(status);
		result.setData(data);
		return result;
	}

	public static ActionResult fail(String msg,Integer status,Object data){
		ActionResult result = new ActionResult();
		result.setMsg(msg);
		result.setStatus(status);
		result.setData(data);
		return result;
	}
}
